package com.tbw.service;

import com.tbw.dao.UserRepository;
import com.tbw.entity.User;
import com.tbw.util.MD5Utils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class UserServiceImpl  implements UserService{

    @Autowired
    private UserRepository userRepository;

    @Override
    public User checkUser(String username, String passord) {
        User user=userRepository.findByUsernameAndPassword(username, MD5Utils.code(passord));
        return user;
    }
}
